<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="zh">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=11"/>
<meta name="generator" content="Doxygen 1.11.0"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>cppMISC: serial类 参考</title>
<link href="../../tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="../../jquery.js"></script>
<script type="text/javascript" src="../../dynsections.js"></script>
<script type="text/javascript" src="../../clipboard.js"></script>
<link href="../../navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="../../resize.js"></script>
<script type="text/javascript" src="../../cookie.js"></script>
<link href="../../search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="../../search/searchdata.js"></script>
<script type="text/javascript" src="../../search/search.js"></script>
<script type="text/javascript" src="../../darkmode_toggle.js"></script>
<link href="../../doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr id="projectrow">
  <td id="projectalign">
   <div id="projectname">cppMISC<span id="projectnumber">&#160;v1.1</span>
   </div>
   <div id="projectbrief">cppMisc 文档系统</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- 制作者 Doxygen 1.11.0 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
var searchBox = new SearchBox("searchBox", "../../search/",'.html');
/* @license-end */
</script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(function() { codefold.init(1); });
/* @license-end */
</script>
<script type="text/javascript" src="../../menudata.js"></script>
<script type="text/javascript" src="../../menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(function() {
  initMenu('../../',true,false,'search.php','搜索',false);
  $(function() { init_search(); });
});
/* @license-end */
</script>
<div id="main-nav"></div>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(function(){ initResizable(false); });
/* @license-end */
</script>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<div id="MSearchResults">
<div class="SRPage">
<div id="SRIndex">
<div id="SRResults"></div>
<div class="SRStatus" id="Loading">载入中...</div>
<div class="SRStatus" id="Searching">搜索中...</div>
<div class="SRStatus" id="NoMatches">未找到</div>
</div>
</div>
</div>
</div>

</div><!-- top -->
<div id="doc-content">
<div class="header">
  <div class="summary">
<a href="#pub-types">Public 类型</a> &#124;
<a href="#pub-methods">Public 成员函数</a> &#124;
<a href="../../de/d70/classserial-members.html">所有成员列表</a>  </div>
  <div class="headertitle"><div class="title">serial类 参考</div></div>
</div><!--header-->
<div class="contents">

<p>串口模块实现  
 <a href="#details">更多...</a></p>

<p><code>#include &lt;<a class="el" href="../../d8/d9b/mandarava_2linux_2serial_8hpp_source.html">serial.hpp</a>&gt;</code></p>
<div class="dynheader">
类 serial 继承关系图:</div>
<div class="dyncontent">
<div class="center"><img src="../../dc/d3e/classserial__inherit__graph.png" border="0" usemap="#aserial_inherit__map" alt="Inheritance graph"/></div>
<map name="aserial_inherit__map" id="aserial_inherit__map">
<area shape="rect" title="串口模块实现" alt="" coords="5,192,208,619"/>
<area shape="rect" href="../../db/d78/structdata_ch.html" title=" " alt="" coords="20,5,193,144"/>
<area shape="poly" title=" " alt="" coords="109,159,109,192,104,192,104,159"/>
</map>
</div>
<div class="dynheader">
serial 的协作图:</div>
<div class="dyncontent">
<div class="center"><img src="../../d8/dd5/classserial__coll__graph.png" border="0" usemap="#aserial_coll__map" alt="Collaboration graph"/></div>
<map name="aserial_coll__map" id="aserial_coll__map">
<area shape="rect" title="串口模块实现" alt="" coords="5,192,208,619"/>
<area shape="rect" href="../../db/d78/structdata_ch.html" title=" " alt="" coords="20,5,193,144"/>
<area shape="poly" title=" " alt="" coords="109,159,109,192,104,192,104,159"/>
</map>
</div>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="pub-types" name="pub-types"></a>
Public 类型</h2></td></tr>
<tr class="memitem:ad4fb601321062cb1cd41df62d5e7be5e" id="r_ad4fb601321062cb1cd41df62d5e7be5e"><td class="memItemLeft" align="right" valign="top">enum class &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#ad4fb601321062cb1cd41df62d5e7be5e">parity</a> { <a class="el" href="#ad4fb601321062cb1cd41df62d5e7be5eab50339a10e1de285ac99d4c3990b8693">NONE</a>
, <a class="el" href="#ad4fb601321062cb1cd41df62d5e7be5ea57a1355d5527355458c7cc08ba70bf94">ODD</a>
, <a class="el" href="#ad4fb601321062cb1cd41df62d5e7be5ea6634c67f28ba9a80efe941b9519aa106">EVEN</a>
 }</td></tr>
<tr class="separator:ad4fb601321062cb1cd41df62d5e7be5e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ae74c7da14bafdea44212a00ddb5d6d07" id="r_ae74c7da14bafdea44212a00ddb5d6d07"><td class="memItemLeft" align="right" valign="top">enum class &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#ae74c7da14bafdea44212a00ddb5d6d07">stop</a> { <a class="el" href="#ae74c7da14bafdea44212a00ddb5d6d07abc21e6484530fc9d0313cb816b733396">ONE</a>
, <a class="el" href="#ae74c7da14bafdea44212a00ddb5d6d07a75872ef0066c09a9f7741c8d0c0b8b34">ONE_P_FIVE</a>
, <a class="el" href="#ae74c7da14bafdea44212a00ddb5d6d07a0f82d86afa0f5dc965c5c15aca58dcfb">TWO</a>
 }</td></tr>
<tr class="separator:ae74c7da14bafdea44212a00ddb5d6d07"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a1a213e88363227465045c5857e4c2cb1" id="r_a1a213e88363227465045c5857e4c2cb1"><td class="memItemLeft" align="right" valign="top">enum class &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#a1a213e88363227465045c5857e4c2cb1">flow</a> { <a class="el" href="#a1a213e88363227465045c5857e4c2cb1ab50339a10e1de285ac99d4c3990b8693">NONE</a>
, <a class="el" href="#a1a213e88363227465045c5857e4c2cb1afcf09a2bc8b0f286d4461c402fe7cc27">XON_XOFF</a>
, <a class="el" href="#a1a213e88363227465045c5857e4c2cb1a976f804182cba20ca142d4ff882fde66">RTS_CTS</a>
 }</td></tr>
<tr class="separator:a1a213e88363227465045c5857e4c2cb1"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="pub-methods" name="pub-methods"></a>
Public 成员函数</h2></td></tr>
<tr class="memitem:a7adc9418a6c7c446a73cbc40966a78e6" id="r_a7adc9418a6c7c446a73cbc40966a78e6"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#a7adc9418a6c7c446a73cbc40966a78e6">serial</a> (const std::string &amp;name)</td></tr>
<tr class="separator:a7adc9418a6c7c446a73cbc40966a78e6"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a4df5a4447d8c57723f325569f3055362" id="r_a4df5a4447d8c57723f325569f3055362"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#a4df5a4447d8c57723f325569f3055362">serial</a> (const std::string &amp;name, int baud, int dbits=8, <a class="el" href="#ae74c7da14bafdea44212a00ddb5d6d07">stop</a> s=<a class="el" href="#ae74c7da14bafdea44212a00ddb5d6d07abc21e6484530fc9d0313cb816b733396">stop::ONE</a>, <a class="el" href="#ad4fb601321062cb1cd41df62d5e7be5e">parity</a> p=<a class="el" href="#ad4fb601321062cb1cd41df62d5e7be5eab50339a10e1de285ac99d4c3990b8693">parity::NONE</a>, <a class="el" href="#a1a213e88363227465045c5857e4c2cb1">flow</a> f=<a class="el" href="#a1a213e88363227465045c5857e4c2cb1ab50339a10e1de285ac99d4c3990b8693">flow::NONE</a>)</td></tr>
<tr class="separator:a4df5a4447d8c57723f325569f3055362"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a59020b99c660677476f029b75346a690" id="r_a59020b99c660677476f029b75346a690"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#a59020b99c660677476f029b75346a690">open</a> ()</td></tr>
<tr class="memdesc:a59020b99c660677476f029b75346a690"><td class="mdescLeft">&#160;</td><td class="mdescRight">打开串口  <br /></td></tr>
<tr class="separator:a59020b99c660677476f029b75346a690"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a7d780916970b518a596bbaeb232a0454" id="r_a7d780916970b518a596bbaeb232a0454"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#a7d780916970b518a596bbaeb232a0454">open</a> (int baud, int dbits=8, <a class="el" href="#ae74c7da14bafdea44212a00ddb5d6d07">stop</a> s=<a class="el" href="#ae74c7da14bafdea44212a00ddb5d6d07abc21e6484530fc9d0313cb816b733396">stop::ONE</a>, <a class="el" href="#ad4fb601321062cb1cd41df62d5e7be5e">parity</a> p=<a class="el" href="#ad4fb601321062cb1cd41df62d5e7be5eab50339a10e1de285ac99d4c3990b8693">parity::NONE</a>, <a class="el" href="#a1a213e88363227465045c5857e4c2cb1">flow</a> f=<a class="el" href="#a1a213e88363227465045c5857e4c2cb1ab50339a10e1de285ac99d4c3990b8693">flow::NONE</a>)</td></tr>
<tr class="separator:a7d780916970b518a596bbaeb232a0454"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aa4a211abe8ab54f217ae170b8fc92724" id="r_aa4a211abe8ab54f217ae170b8fc92724"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#aa4a211abe8ab54f217ae170b8fc92724">close</a> ()</td></tr>
<tr class="separator:aa4a211abe8ab54f217ae170b8fc92724"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ae4220a528c470f77dc9d29b8d79f5286" id="r_ae4220a528c470f77dc9d29b8d79f5286"><td class="memItemLeft" align="right" valign="top">size_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#ae4220a528c470f77dc9d29b8d79f5286">send</a> (const char *data, size_t len)</td></tr>
<tr class="separator:ae4220a528c470f77dc9d29b8d79f5286"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a7146f26ba6f41f3bebdde28b377f82cd" id="r_a7146f26ba6f41f3bebdde28b377f82cd"><td class="memItemLeft" align="right" valign="top">virtual nativeH_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#a7146f26ba6f41f3bebdde28b377f82cd">native_handle</a> () final</td></tr>
<tr class="separator:a7146f26ba6f41f3bebdde28b377f82cd"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ad6c571041b222a833922c81e1ba9ad50" id="r_ad6c571041b222a833922c81e1ba9ad50"><td class="memItemLeft" align="right" valign="top">virtual void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#ad6c571041b222a833922c81e1ba9ad50">onReadyRead</a> (const uint8_t *data, size len) final</td></tr>
<tr class="separator:ad6c571041b222a833922c81e1ba9ad50"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="inherit_header pub_methods_structdata_ch"><td colspan="2" onclick="javascript:dynsection.toggleInherit('pub_methods_structdata_ch')"><img src="../../closed.png" alt="-"/>&#160;Public 成员函数 继承自 <a class="el" href="../../db/d78/structdata_ch.html">dataCh</a></td></tr>
<tr class="memitem:aec26b87a6293709885e7ce6b4348cc69 inherit pub_methods_structdata_ch" id="r_aec26b87a6293709885e7ce6b4348cc69"><td class="memItemLeft" align="right" valign="top">virtual void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../db/d78/structdata_ch.html#aec26b87a6293709885e7ce6b4348cc69">onReadyRead</a> (const char *data=nullptr, size_t len)=0</td></tr>
<tr class="separator:aec26b87a6293709885e7ce6b4348cc69 inherit pub_methods_structdata_ch"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="inherited" name="inherited"></a>
额外继承的成员函数</h2></td></tr>
<tr class="inherit_header pub_attribs_structdata_ch"><td colspan="2" onclick="javascript:dynsection.toggleInherit('pub_attribs_structdata_ch')"><img src="../../closed.png" alt="-"/>&#160;Public 属性 继承自 <a class="el" href="../../db/d78/structdata_ch.html">dataCh</a></td></tr>
<tr class="memitem:a10a58a51fe8cd1be6341144a5e9af598 inherit pub_attribs_structdata_ch" id="r_a10a58a51fe8cd1be6341144a5e9af598"><td class="memItemLeft" align="right" valign="top"><a class="el" href="../../de/dfb/data_ch_8hpp.html#a26fac20c91f664a1fc2936bfddc87112">chType</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../db/d78/structdata_ch.html#a10a58a51fe8cd1be6341144a5e9af598">m_type</a></td></tr>
<tr class="separator:a10a58a51fe8cd1be6341144a5e9af598 inherit pub_attribs_structdata_ch"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">详细描述</h2>
<div class="textblock"><p>串口模块实现 </p>

<p class="definition">在文件 <a class="el" href="../../d8/d9b/mandarava_2linux_2serial_8hpp_source.html">serial.hpp</a> 第 <a class="el" href="../../d8/d9b/mandarava_2linux_2serial_8hpp_source.html#l00013">13</a> 行定义.</p>
</div><h2 class="groupheader">成员枚举类型说明</h2>
<a id="a1a213e88363227465045c5857e4c2cb1" name="a1a213e88363227465045c5857e4c2cb1"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a1a213e88363227465045c5857e4c2cb1">&#9670;&#160;</a></span>flow</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">enum class <a class="el" href="#a1a213e88363227465045c5857e4c2cb1">serial::flow</a></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">strong</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<table class="fieldtable">
<tr><th colspan="2">枚举值</th></tr><tr><td class="fieldname"><a id="a1a213e88363227465045c5857e4c2cb1ab50339a10e1de285ac99d4c3990b8693" name="a1a213e88363227465045c5857e4c2cb1ab50339a10e1de285ac99d4c3990b8693"></a>NONE&#160;</td><td class="fielddoc"></td></tr>
<tr><td class="fieldname"><a id="a1a213e88363227465045c5857e4c2cb1afcf09a2bc8b0f286d4461c402fe7cc27" name="a1a213e88363227465045c5857e4c2cb1afcf09a2bc8b0f286d4461c402fe7cc27"></a>XON_XOFF&#160;</td><td class="fielddoc"></td></tr>
<tr><td class="fieldname"><a id="a1a213e88363227465045c5857e4c2cb1a976f804182cba20ca142d4ff882fde66" name="a1a213e88363227465045c5857e4c2cb1a976f804182cba20ca142d4ff882fde66"></a>RTS_CTS&#160;</td><td class="fielddoc"></td></tr>
</table>

<p class="definition">在文件 <a class="el" href="../../d8/d9b/mandarava_2linux_2serial_8hpp_source.html">serial.hpp</a> 第 <a class="el" href="../../d8/d9b/mandarava_2linux_2serial_8hpp_source.html#l00018">18</a> 行定义.</p>

</div>
</div>
<a id="ad4fb601321062cb1cd41df62d5e7be5e" name="ad4fb601321062cb1cd41df62d5e7be5e"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ad4fb601321062cb1cd41df62d5e7be5e">&#9670;&#160;</a></span>parity</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">enum class <a class="el" href="#ad4fb601321062cb1cd41df62d5e7be5e">serial::parity</a></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">strong</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<table class="fieldtable">
<tr><th colspan="2">枚举值</th></tr><tr><td class="fieldname"><a id="ad4fb601321062cb1cd41df62d5e7be5eab50339a10e1de285ac99d4c3990b8693" name="ad4fb601321062cb1cd41df62d5e7be5eab50339a10e1de285ac99d4c3990b8693"></a>NONE&#160;</td><td class="fielddoc"></td></tr>
<tr><td class="fieldname"><a id="ad4fb601321062cb1cd41df62d5e7be5ea57a1355d5527355458c7cc08ba70bf94" name="ad4fb601321062cb1cd41df62d5e7be5ea57a1355d5527355458c7cc08ba70bf94"></a>ODD&#160;</td><td class="fielddoc"></td></tr>
<tr><td class="fieldname"><a id="ad4fb601321062cb1cd41df62d5e7be5ea6634c67f28ba9a80efe941b9519aa106" name="ad4fb601321062cb1cd41df62d5e7be5ea6634c67f28ba9a80efe941b9519aa106"></a>EVEN&#160;</td><td class="fielddoc"></td></tr>
</table>

<p class="definition">在文件 <a class="el" href="../../d8/d9b/mandarava_2linux_2serial_8hpp_source.html">serial.hpp</a> 第 <a class="el" href="../../d8/d9b/mandarava_2linux_2serial_8hpp_source.html#l00016">16</a> 行定义.</p>

</div>
</div>
<a id="ae74c7da14bafdea44212a00ddb5d6d07" name="ae74c7da14bafdea44212a00ddb5d6d07"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ae74c7da14bafdea44212a00ddb5d6d07">&#9670;&#160;</a></span>stop</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">enum class <a class="el" href="#ae74c7da14bafdea44212a00ddb5d6d07">serial::stop</a></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">strong</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<table class="fieldtable">
<tr><th colspan="2">枚举值</th></tr><tr><td class="fieldname"><a id="ae74c7da14bafdea44212a00ddb5d6d07abc21e6484530fc9d0313cb816b733396" name="ae74c7da14bafdea44212a00ddb5d6d07abc21e6484530fc9d0313cb816b733396"></a>ONE&#160;</td><td class="fielddoc"></td></tr>
<tr><td class="fieldname"><a id="ae74c7da14bafdea44212a00ddb5d6d07a75872ef0066c09a9f7741c8d0c0b8b34" name="ae74c7da14bafdea44212a00ddb5d6d07a75872ef0066c09a9f7741c8d0c0b8b34"></a>ONE_P_FIVE&#160;</td><td class="fielddoc"></td></tr>
<tr><td class="fieldname"><a id="ae74c7da14bafdea44212a00ddb5d6d07a0f82d86afa0f5dc965c5c15aca58dcfb" name="ae74c7da14bafdea44212a00ddb5d6d07a0f82d86afa0f5dc965c5c15aca58dcfb"></a>TWO&#160;</td><td class="fielddoc"></td></tr>
</table>

<p class="definition">在文件 <a class="el" href="../../d8/d9b/mandarava_2linux_2serial_8hpp_source.html">serial.hpp</a> 第 <a class="el" href="../../d8/d9b/mandarava_2linux_2serial_8hpp_source.html#l00017">17</a> 行定义.</p>

</div>
</div>
<h2 class="groupheader">构造及析构函数说明</h2>
<a id="a7adc9418a6c7c446a73cbc40966a78e6" name="a7adc9418a6c7c446a73cbc40966a78e6"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a7adc9418a6c7c446a73cbc40966a78e6">&#9670;&#160;</a></span>serial() <span class="overload">[1/2]</span></h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">serial::serial </td>
          <td>(</td>
          <td class="paramtype">const std::string &amp;</td>          <td class="paramname"><span class="paramname"><em>name</em></span></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p class="definition">在文件 <a class="el" href="../../dc/d98/mandarava_2linux_2serial_8cpp_source.html">serial.cpp</a> 第 <a class="el" href="../../dc/d98/mandarava_2linux_2serial_8cpp_source.html#l00007">7</a> 行定义.</p>

</div>
</div>
<a id="a4df5a4447d8c57723f325569f3055362" name="a4df5a4447d8c57723f325569f3055362"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a4df5a4447d8c57723f325569f3055362">&#9670;&#160;</a></span>serial() <span class="overload">[2/2]</span></h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">serial::serial </td>
          <td>(</td>
          <td class="paramtype">const std::string &amp;</td>          <td class="paramname"><span class="paramname"><em>name</em></span>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int</td>          <td class="paramname"><span class="paramname"><em>baud</em></span>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int</td>          <td class="paramname"><span class="paramname"><em>dbits</em></span><span class="paramdefsep"> = </span><span class="paramdefval">8</span>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="#ae74c7da14bafdea44212a00ddb5d6d07">stop</a></td>          <td class="paramname"><span class="paramname"><em>s</em></span><span class="paramdefsep"> = </span><span class="paramdefval"><a class="el" href="#ae74c7da14bafdea44212a00ddb5d6d07abc21e6484530fc9d0313cb816b733396">stop::ONE</a></span>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="#ad4fb601321062cb1cd41df62d5e7be5e">parity</a></td>          <td class="paramname"><span class="paramname"><em>p</em></span><span class="paramdefsep"> = </span><span class="paramdefval"><a class="el" href="#ad4fb601321062cb1cd41df62d5e7be5eab50339a10e1de285ac99d4c3990b8693">parity::NONE</a></span>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="#a1a213e88363227465045c5857e4c2cb1">flow</a></td>          <td class="paramname"><span class="paramname"><em>f</em></span><span class="paramdefsep"> = </span><span class="paramdefval"><a class="el" href="#a1a213e88363227465045c5857e4c2cb1ab50339a10e1de285ac99d4c3990b8693">flow::NONE</a></span>&#160;)</td>
        </tr>
      </table>
</div><div class="memdoc">

<p class="definition">在文件 <a class="el" href="../../dc/d98/mandarava_2linux_2serial_8cpp_source.html">serial.cpp</a> 第 <a class="el" href="../../dc/d98/mandarava_2linux_2serial_8cpp_source.html#l00026">26</a> 行定义.</p>

</div>
</div>
<h2 class="groupheader">成员函数说明</h2>
<a id="aa4a211abe8ab54f217ae170b8fc92724" name="aa4a211abe8ab54f217ae170b8fc92724"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aa4a211abe8ab54f217ae170b8fc92724">&#9670;&#160;</a></span>close()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool serial::close </td>
          <td>(</td>
          <td class="paramname"><span class="paramname"><em></em></span></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p class="definition">在文件 <a class="el" href="../../dc/d98/mandarava_2linux_2serial_8cpp_source.html">serial.cpp</a> 第 <a class="el" href="../../dc/d98/mandarava_2linux_2serial_8cpp_source.html#l00075">75</a> 行定义.</p>
<div class="dynheader">
函数调用图:</div>
<div class="dyncontent">
<div class="center"><img src="../../d8/dc6/classserial_aa4a211abe8ab54f217ae170b8fc92724_cgraph.png" border="0" usemap="#ad8/dc6/classserial_aa4a211abe8ab54f217ae170b8fc92724_cgraph" alt=""/></div>
<map name="ad8/dc6/classserial_aa4a211abe8ab54f217ae170b8fc92724_cgraph" id="ad8/dc6/classserial_aa4a211abe8ab54f217ae170b8fc92724_cgraph">
<area shape="rect" title=" " alt="" coords="5,13,97,40"/>
<area shape="rect" href="../../da/d39/classwheels_1_1malloc_shared_ptr.html#ab6d04b824d0c91bfbb2749704eb3a0b9" title="指定当前的数据长度" alt="" coords="145,5,311,48"/>
<area shape="poly" title=" " alt="" coords="97,24,129,24,129,29,97,29"/>
</map>
</div>

</div>
</div>
<a id="a7146f26ba6f41f3bebdde28b377f82cd" name="a7146f26ba6f41f3bebdde28b377f82cd"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a7146f26ba6f41f3bebdde28b377f82cd">&#9670;&#160;</a></span>native_handle()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">nativeH_t serial::native_handle </td>
          <td>(</td>
          <td class="paramname"><span class="paramname"><em></em></span></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">final</span><span class="mlabel">virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>实现了 <a class="el" href="../../db/d78/structdata_ch.html#ac58c0dde99cef17a9d095d066479897c">dataCh</a>.</p>

<p class="definition">在文件 <a class="el" href="../../dc/d98/mandarava_2linux_2serial_8cpp_source.html">serial.cpp</a> 第 <a class="el" href="../../dc/d98/mandarava_2linux_2serial_8cpp_source.html#l00198">198</a> 行定义.</p>

</div>
</div>
<a id="ad6c571041b222a833922c81e1ba9ad50" name="ad6c571041b222a833922c81e1ba9ad50"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ad6c571041b222a833922c81e1ba9ad50">&#9670;&#160;</a></span>onReadyRead()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">void serial::onReadyRead </td>
          <td>(</td>
          <td class="paramtype">const uint8_t *</td>          <td class="paramname"><span class="paramname"><em>data</em></span>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">size</td>          <td class="paramname"><span class="paramname"><em>len</em></span>&#160;)</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">final</span><span class="mlabel">virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p class="definition">在文件 <a class="el" href="../../dc/d98/mandarava_2linux_2serial_8cpp_source.html">serial.cpp</a> 第 <a class="el" href="../../dc/d98/mandarava_2linux_2serial_8cpp_source.html#l00203">203</a> 行定义.</p>
<div class="dynheader">
函数调用图:</div>
<div class="dyncontent">
<div class="center"><img src="../../d8/dc6/classserial_ad6c571041b222a833922c81e1ba9ad50_cgraph.png" border="0" usemap="#ad8/dc6/classserial_ad6c571041b222a833922c81e1ba9ad50_cgraph" alt=""/></div>
<map name="ad8/dc6/classserial_ad6c571041b222a833922c81e1ba9ad50_cgraph" id="ad8/dc6/classserial_ad6c571041b222a833922c81e1ba9ad50_cgraph">
<area shape="rect" title=" " alt="" coords="5,13,149,40"/>
<area shape="rect" href="../../da/d39/classwheels_1_1malloc_shared_ptr.html#ab6d04b824d0c91bfbb2749704eb3a0b9" title="指定当前的数据长度" alt="" coords="197,5,363,48"/>
<area shape="poly" title=" " alt="" coords="149,24,181,24,181,29,149,29"/>
</map>
</div>

</div>
</div>
<a id="a59020b99c660677476f029b75346a690" name="a59020b99c660677476f029b75346a690"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a59020b99c660677476f029b75346a690">&#9670;&#160;</a></span>open() <span class="overload">[1/2]</span></h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool serial::open </td>
          <td>(</td>
          <td class="paramname"><span class="paramname"><em></em></span></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>打开串口 </p>

<p class="definition">在文件 <a class="el" href="../../dc/d98/mandarava_2linux_2serial_8cpp_source.html">serial.cpp</a> 第 <a class="el" href="../../dc/d98/mandarava_2linux_2serial_8cpp_source.html#l00045">45</a> 行定义.</p>

</div>
</div>
<a id="a7d780916970b518a596bbaeb232a0454" name="a7d780916970b518a596bbaeb232a0454"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a7d780916970b518a596bbaeb232a0454">&#9670;&#160;</a></span>open() <span class="overload">[2/2]</span></h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool serial::open </td>
          <td>(</td>
          <td class="paramtype">int</td>          <td class="paramname"><span class="paramname"><em>baud</em></span>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int</td>          <td class="paramname"><span class="paramname"><em>dbits</em></span><span class="paramdefsep"> = </span><span class="paramdefval">8</span>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="#ae74c7da14bafdea44212a00ddb5d6d07">stop</a></td>          <td class="paramname"><span class="paramname"><em>s</em></span><span class="paramdefsep"> = </span><span class="paramdefval"><a class="el" href="#ae74c7da14bafdea44212a00ddb5d6d07abc21e6484530fc9d0313cb816b733396">stop::ONE</a></span>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="#ad4fb601321062cb1cd41df62d5e7be5e">parity</a></td>          <td class="paramname"><span class="paramname"><em>p</em></span><span class="paramdefsep"> = </span><span class="paramdefval"><a class="el" href="#ad4fb601321062cb1cd41df62d5e7be5eab50339a10e1de285ac99d4c3990b8693">parity::NONE</a></span>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="#a1a213e88363227465045c5857e4c2cb1">flow</a></td>          <td class="paramname"><span class="paramname"><em>f</em></span><span class="paramdefsep"> = </span><span class="paramdefval"><a class="el" href="#a1a213e88363227465045c5857e4c2cb1ab50339a10e1de285ac99d4c3990b8693">flow::NONE</a></span>&#160;)</td>
        </tr>
      </table>
</div><div class="memdoc">

<p class="definition">在文件 <a class="el" href="../../dc/d98/mandarava_2linux_2serial_8cpp_source.html">serial.cpp</a> 第 <a class="el" href="../../dc/d98/mandarava_2linux_2serial_8cpp_source.html#l00058">58</a> 行定义.</p>

</div>
</div>
<a id="ae4220a528c470f77dc9d29b8d79f5286" name="ae4220a528c470f77dc9d29b8d79f5286"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ae4220a528c470f77dc9d29b8d79f5286">&#9670;&#160;</a></span>send()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">size_t serial::send </td>
          <td>(</td>
          <td class="paramtype">const char *</td>          <td class="paramname"><span class="paramname"><em>data</em></span>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">size_t</td>          <td class="paramname"><span class="paramname"><em>len</em></span>&#160;)</td>
        </tr>
      </table>
</div><div class="memdoc">

<p class="definition">在文件 <a class="el" href="../../dc/d98/mandarava_2linux_2serial_8cpp_source.html">serial.cpp</a> 第 <a class="el" href="../../dc/d98/mandarava_2linux_2serial_8cpp_source.html#l00099">99</a> 行定义.</p>
<div class="dynheader">
函数调用图:</div>
<div class="dyncontent">
<div class="center"><img src="../../d8/dc6/classserial_ae4220a528c470f77dc9d29b8d79f5286_cgraph.png" border="0" usemap="#ad8/dc6/classserial_ae4220a528c470f77dc9d29b8d79f5286_cgraph" alt=""/></div>
<map name="ad8/dc6/classserial_ae4220a528c470f77dc9d29b8d79f5286_cgraph" id="ad8/dc6/classserial_ae4220a528c470f77dc9d29b8d79f5286_cgraph">
<area shape="rect" title=" " alt="" coords="5,13,94,40"/>
<area shape="rect" href="../../da/d39/classwheels_1_1malloc_shared_ptr.html#ab6d04b824d0c91bfbb2749704eb3a0b9" title="指定当前的数据长度" alt="" coords="142,5,308,48"/>
<area shape="poly" title=" " alt="" coords="94,24,126,24,126,29,94,29"/>
</map>
</div>

</div>
</div>
<hr/>该类的文档由以下文件生成:<ul>
<li>include/mandarava/linux/<a class="el" href="../../d8/d9b/mandarava_2linux_2serial_8hpp_source.html">serial.hpp</a></li>
<li>src/mandarava/linux/<a class="el" href="../../dc/d98/mandarava_2linux_2serial_8cpp_source.html">serial.cpp</a></li>
</ul>
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
制作者&#160;<a href="https://www.doxygen.org/index.html"><img class="footer" src="../../doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.11.0
</small></address>
</div><!-- doc-content -->
</body>
</html>
